import { Button } from 'antd';
import { useModal } from '.';
const Demo = (props) => {
  const {} = props;

  const {
    state,
    row,
    node: ModalNode,
    show: showModal,
    hide: hideModal,
  } = useModal({
    modal: {
      title: {
        title: '节瓜',
      },
    },
    slot(row) {
      return <>{JSON.stringify(row)}</>;
    },
  });

  return (
    <>
      <h3>useModal</h3>
      <Button onClick={() => showModal({ a: 123, b: '123' })}>节瓜</Button>
      {ModalNode}
    </>
  );
};
export default Demo;
